<!--
  * 职位
  *
  * @Author:    zw
  * @Date:      2024-06-27 23:09:02
  * @Wechat:    kaiyun
  * @Email:     lab1024@163.com
  * @Copyright  1024创新实验室 （ https://1024lab.net ），Since 2012
-->
<template>
    <div class="img-mask" v-if="visible" @click="closeImgMask">
        <a-image
            :src="imageUrl"
            width="800px"
            :preview="false"      
            />
    </div>
  </template>
  
  <script setup>
    import { onMounted, ref, watch } from 'vue';
    import imgul from '/@/assets/car.jpeg'
    const visible = ref(false)
    const imageUrl = ref(null)
    function clearimageUrl(){
        imageUrl.value = null;
    }
    function closeImgMask(){
        visible.value = false;
      imageUrl.value = null;
    }
    function showImgMask(src) {
      visible.value = true;
      imageUrl.value = src;
      
    }
    defineExpose({
      showImgMask,
    });
  </script>
<style lang="less">
.img-mask{
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    background-color: rgba(0, 0, 0, 0.45);
    display: flex;
    justify-content: center;
    align-items: center;
}
</style>
  